package com.ruoyi.ResearchProjects.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ResearchProjects.mapper.ResearchProjectsMapper;
import com.ruoyi.ResearchProjects.domain.ResearchProjects;
import com.ruoyi.ResearchProjects.service.IResearchProjectsService;

/**
 * 科研项目Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-13
 */
@Service
public class ResearchProjectsServiceImpl extends ServiceImpl<ResearchProjectsMapper,ResearchProjects> implements IResearchProjectsService
{
    @Autowired
    private ResearchProjectsMapper researchProjectsMapper;

    /**
     * 查询科研项目
     * 
     * @param projectId 科研项目主键
     * @return 科研项目
     */
    @Override
    public ResearchProjects selectResearchProjectsByProjectId(Long projectId)
    {
        return researchProjectsMapper.selectResearchProjectsByProjectId(projectId);
    }

    /**
     * 查询科研项目列表
     * 
     * @param researchProjects 科研项目
     * @return 科研项目
     */
    @Override
    public List<ResearchProjects> selectResearchProjectsList(ResearchProjects researchProjects)
    {
        return researchProjectsMapper.selectResearchProjectsList(researchProjects);
    }

    /**
     * 新增科研项目
     * 
     * @param researchProjects 科研项目
     * @return 结果
     */
    @Override
    public int insertResearchProjects(ResearchProjects researchProjects)
    {
        return researchProjectsMapper.insertResearchProjects(researchProjects);
    }

    /**
     * 修改科研项目
     * 
     * @param researchProjects 科研项目
     * @return 结果
     */
    @Override
    public int updateResearchProjects(ResearchProjects researchProjects)
    {
        return researchProjectsMapper.updateResearchProjects(researchProjects);
    }

    /**
     * 批量删除科研项目
     * 
     * @param projectIds 需要删除的科研项目主键
     * @return 结果
     */
    @Override
    public int deleteResearchProjectsByProjectIds(Long[] projectIds)
    {
        return researchProjectsMapper.deleteResearchProjectsByProjectIds(projectIds);
    }

    /**
     * 删除科研项目信息
     * 
     * @param projectId 科研项目主键
     * @return 结果
     */
    @Override
    public int deleteResearchProjectsByProjectId(Long projectId)
    {
        return researchProjectsMapper.deleteResearchProjectsByProjectId(projectId);
    }
}
